<!DOCTYPE html>
<html>
  <head>
    <script src="../../../../processing.js"></script>
    <link rel="stylesheet" href="../../../style.css" />
  </head>
  <body>
    <h1>beginShape() and endShape() test</h1>

    <p>
    <canvas datasrc="endShape-3Dtest-points.pjs" width="500" height="100"></canvas>
    </p>

    <pre>
size(500, 100, P3D);
background(200);

beginShape(POINTS);
stroke(255,0,0);vertex(30, 20);
stroke(0,0,255);vertex(85, 20);
stroke(0,255,0);vertex(85, 75);
stroke(255,0,0);vertex(30, 75);
endShape(CLOSE);

beginShape(POINTS);
stroke(0,0,255);vertex(130, 20);
stroke(255,0,0);vertex(185, 20);
stroke(255,0,0);vertex(185, 75);
endShape(CLOSE);

beginShape(POINTS);
stroke(0,0,0);vertex(230, 20);
stroke(255,0,0);vertex(285, 20);
endShape(CLOSE);

beginShape(POINTS);
stroke(0,0,255);vertex(330, 20);
endShape(CLOSE);</pre>
  </body>
</html>